<script lang="ts" setup>
import { ref } from "vue";

const test = ref<string>();
const setValueByInterface = (func: () => string) => {
  test.value = func();
};
const myfun = () => {
  alert("hi");
};
defineExpose({ setValueByInterface, myfun });
</script>

<template>
  <div>child---{{ test }}</div>
</template>

<style lang="scss" scoped></style>
